<?php


namespace Part24_IntermediaryModel\Code3;

require_once '../../autoload.php';

$jinli = new CommonManger('金利');
$zongjian = new Majordomo('宗剑');
$zhongjingli = new GeneralManger('钟精励');
$jinli->setSuperior($zongjian);
$zongjian->setSuperior($zhongjingli);

$request = new Request();
$request->setType('加薪');
$request->setContent('张三请求加薪');
$request->setNum(1000);

// 直接向经理发起即可，至于谁处理不关心
$jinli->requestApplications($request);

$request2 = new Request();
$request2->setType('请假');
$request2->setContent('张三请假');
$request2->setNum(3);

$jinli->requestApplications($request2);

$request3 = new Request();
$request3->setType('请假');
$request3->setContent('张三请假');
$request3->setNum(1);

$jinli->requestApplications($request3);


$request4 = new Request();
$request4->setType('加薪');
$request4->setContent('张三请求加薪');
$request4->setNum(200);

$jinli->requestApplications($request4);